package com.jf.cloud.payment.allinpay.member.resp;

import com.jf.cloud.payment.allinpay.member.CardType;
import org.apache.commons.lang.StringUtils;

/**
 * @author LGH
 */
public class BindCard {

	/**
	 * 绑定银行卡号
	 */
	private String bankCardNo;

	/**
	 * 银行名称
	 */
	private String bankName;

	/**
	 * 绑定时间，yyyy-MM-ddHH:mm:ss
	 */
	private String bindTime;

	/**
	 * 银行卡类型
	 */
	private Integer cardType;

	/**
	 * 绑定状态
	 * 1 已绑定 2已解除
	 */
	private Integer bindState;

	/**
	 * 银行预留手机号码（仅四要素绑定的银行卡返回）
	 */
	private String phone;

	/**
	 * 是否安全卡
	 */
	private Boolean isSafeCard;

	/**
	 * 是否实名付
	 */
	private Boolean isVerifyPayChecked;


	private Integer bindMethod;

	private String cardTypeString;

	/**
	 * 返回解密字符串，也就是真正银行卡号码
	 * @return 真正银行卡号码
	 */
	public String getBankCardNo() {
		return bankCardNo;
	}

	public void setBankCardNo(String bankCardNo) {
		this.bankCardNo = bankCardNo;
	}

	public String getBankName() {
		return bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}

	public String getBindTime() {
		return bindTime;
	}

	public void setBindTime(String bindTime) {
		this.bindTime = bindTime;
	}

	public Integer getCardType() {
		return cardType;
	}

	public void setCardType(Integer cardType) {
		this.cardType = cardType;
	}

	public Integer getBindState() {
		return bindState;
	}

	public void setBindState(Integer bindState) {
		this.bindState = bindState;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Boolean getIsSafeCard() {
		return isSafeCard;
	}

	public void setIsSafeCard(Boolean isSafeCard) {
		this.isSafeCard = isSafeCard;
	}

	public Boolean getIsVerifyPayChecked() {
		return isVerifyPayChecked;
	}

	public void setIsVerifyPayChecked(Boolean isVerifyPayChecked) {
		this.isVerifyPayChecked = isVerifyPayChecked;
	}

	public Integer getBindMethod() {
		return bindMethod;
	}

	public void setBindMethod(Integer bindMethod) {
		this.bindMethod = bindMethod;
	}

	public String getCardTypeString() {
		if (StringUtils.isNotBlank(this.cardTypeString)){
			return this.cardTypeString;
		}
		return CardType.getDescByCode(cardType);
	}

	public void setCardTypeString(String cardTypeString) {
		this.cardTypeString = cardTypeString;

	}

}
